#ifndef LEARNER_H
#define LEARNER_H


template <int n> class Learner;

#include "mainwindow.h"
#include "Systems/oneservo.h"
#include "Systems/onewheel.h"
#include "Systems/twoservos.h"
#include "Systems/twowheels.h"
#include "Data/learningdata.h"
#include <QString>
#include <QFile>
#include <QTextStream>
#include <QList>
#include <QThread>

using namespace std;

template <int n>
class Learner : public QThread
{
public:
    Learner(MainWindow *w);
    ~Learner();
    void run();
    void episode(LearningData<n> &learn ,Cell<n> *cell);
    double reward(QList<double> params);
    QList<double> getState(QList<double> objective);
private:
    MainWindow *mainWindow;
    AbstractSystem *sys;
    bool ran;
    int dimPos;
};
#include "learner.hpp"

#endif // LEARNER_H
